package com.liu.Work;

import com.liu.File.FileCreate;

import java.io.File;
import java.io.IOException;

public class HomeWork01 {
    public static void main(String[] args) {
        String fillPath = "d:\\mytemp\\";
        String fillName = "hello.txt";
        File m = new File(fillPath);
        if(!m.exists()) {
            m.mkdir();
            File file = new File(fillPath + fillName);
            try {
                file.createNewFile();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            System.out.println("创建"+ m.getName() + "成功");
            System.out.println(fillName + "创建成功");
        }else {
            System.out.println("重复创建");
        }
    }
}
